//
//  LYLMainViewController.m
//  
//
//  Created by dllo on 15/11/6.
//
//

#import "LYLMainViewController.h"
#import <MAMapKit/MAMapKit.h>

@interface LYLMainViewController ()<MAMapViewDelegate>
{
   MAMapView *_mapView;//全局变量
}
@end

@implementation LYLMainViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    [self getMap];
    
}

- (void)getMap
{
    //设置用户的 key
        [MAMapServices sharedServices].apiKey = @"5803f816389199e211e5fde5738e6805";
    _mapView = [[MAMapView alloc] initWithFrame:self.view.bounds];
    _mapView.delegate = self;
    [self.view addSubview:_mapView];
    


}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
